package com.diver.flinkdemo.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.diver.flinkdemo.entity.xxt.TerminalUnit;

import java.util.Date;

/**
 * @Description: 终端设备（卡证）
 * @Author: jeecg-boot
 * @Date:   2023-03-07
 * @Version: V1.0
 */
public interface ITerminalUnitService extends IService<TerminalUnit> {

    /**
     * 根据卡号、卡类型获取个人终端
     * @param cardNum
     * @param cardType
     * @return
     */
    TerminalUnit getOneByCardNum(String cardNum, int cardType);

    /**
     * 更新terminalUnit最新上报时间
     * @param cardNum
     * @param uploadTime
     */
    void updateLastUploadTime(String cardNum, Date uploadTime);

    /**
     * 更新terminalUnit LimitMessageByCard
     * @param cardNum
     * @param limitMessageByCard
     */
    void updateLimitMessageByCard(String cardNum, int limitMessageByCard);

    /**
     * 更新terminalUnit LimitMessageByCard
     * @param cardNum
     * @param limitByPhoneCard
     */
    void updateLimitPhoneCard(String cardNum, int limitByPhoneCard);

}
